<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="icon" href="images/icone_site/favicon.jpg">
		<title>Gamekillers - Administrateur</title>

		<!-- Bootstrap -->
		<link href="css/bootstrap.min.css" rel="stylesheet">

		<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
		<!--[if lt IE 9]>
		  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
		  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
		<![endif]-->
		<link href="css/complement.css" rel="stylesheet">
	</head>
	<body>
		<?php
			include_once("accessoires/header.html");
			include_once("accessoires/menu.html");
		?>
		<section class="page">
			<div role="tabpanel">
				<div class="panel panel-default" style="margin-bottom:0;">
					<!-- Default panel contents -->
					<div class="panel-heading" style="font-size:20px;">Liste des utilisateurs</div>

					<!-- Table -->
					<table class="table">
						<tr>
							<th></th>
							<th>Pseudo</th>
							<th>Nom</th>
							<th>Prénom</th>
							<th>email</th>
							<th>Statut</th>
						</tr>
						<?php $i=0; while (isset($id_user_adm[$i])){ ?>
						<tr>
							<td id="center_cellule"><img src="<?php echo $avatar_user_adm[$i]; ?>" alt="auteur" class="img-circle" height="60" width="60"></td>
							<td id="center_cellule"><?php echo $pseudo_user_adm[$i]; ?></td>
							<td id="center_cellule"><?php echo $nom_user_adm[$i];?></a></td>
							<td id="center_cellule"><?php echo $prenom_user_adm[$i]; ?></td>														
							<td id="center_cellule"><?php echo $email_user_adm[$i]; ?></td>
							<td id="center_cellule">
								<?php echo $statut_user_adm[$i]; ?>
								<?php if ($rang_user_adm[$i]!=3) { ?><!--Si la personne est administrateur alors on n'affiche pas les boutons pour chager le statut-->
									<a href="administrateur.php?user=<?php echo $id_user_adm[$i]; ?>&statut=<?php echo $rang_user_adm[$i]; ?>" class="bouton_modifier">
										<?php if($rang_user_adm[$i]!=0){ ?><!--Si la personne a n'est pas banni alors on affiche le bannir comme lien-->
											Bannir
										<?php }else { ?><!--Sinon on affiche réintégrer comme lien--> 
											Réintégrer
										<?php } ?>
									</a>
								<?php } ?>
							</td>
						</tr>
						<?php $i++; } ?>						
					</table>
				</div>
			</div>		
		</section>
		<?php
			include_once("accessoires/footer.html");
		?>
		<!-- jQuery -->
		<script src="js/jquery-2.1.3.min.js"></script>
		<!-- bootstrap js-->
		<script src="js/bootstrap.min.js"></script>
	</body>
</html>